package com.cnfangmao.masterdata.service;

import java.util.List;

import com.cnfangmao.masterdata.dto.PermissionDto;
import com.cnfangmao.masterdata.dto.RoleDto;
import com.cnfangmao.masterdata.dto.RolePermissionDto;
import com.cnfangmao.masterdata.model.Permission;
import com.cnfangmao.masterdata.model.Role;
import com.cnfangmao.masterdata.model.RolePermission;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 角色表 服务类
 * </p>
 *
 * @author chenxd
 * @since 2020-04-17
 */
public interface RoleService extends IService<Role> {

	Role findByRoleName(String roleName);

	boolean save(RoleDto role, String createdBy);

	boolean update(RoleDto dto, String modifiedBy);

	boolean delete(String roleId);

	IPage<Role> queryListRole(String roleName, int pageNo, int pageSize);
	
	List<PermissionDto> getAllPermissions();
	
	List<RolePermissionDto> getRolePermission(String roleId);
	
	List<Role> getAllRoles();
	
}
